<% include ../common/header.ejs %>
</head>
<body>
    <% include ../common/nav.ejs %>
    <div class="container">
        <div class="row">
            <% include ../common/sidebar.ejs %>
            <div class="col-md-10">
                    <ol class="breadcrumb">
                        <li><a href="#">主页</a></li>
                        <li><a href="#">文章管理</a></li>
                        <li class="active">文章列表</li>
                    </ol>
                    <%if(success){%>
                    <div class="alert alert-success" role="alert"><%=success%></div>
                    <%}%>
                    <%if(error){%>
                    <div class="alert alert-danger" role="alert">...</div>
                    <%}%>

                    <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>aid</th>
                                    <th>标题</th>
                                    <th>所属栏目</th>
                                    <th>作者</th>
                                    <th>阅读数</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
        
                            <tbody>
                                <% for(var i=0;i<articles.length;i++){ %>
                                <tr>
                                    <td><%=articles[i].aid%></td>
                                    <td><%=articles[i].title%></td>
                                    <td><%=articles[i].cname%></td>
                                    <td><%=articles[i].author%></td>
                                    <td><%=articles[i].click%></td>
                                    <td>
                                        <a class="btn btn-success btn-xs" href="">编辑</a>
                                        <a class="btn btn-danger btn-xs" href="">删除</a>
                                    </td>
                                </tr>
                                <%}%>
                            </tbody>
                        </table>
            </div>
        </div>
    </div>

<% include ../common/footer.ejs %>